package com.lanchetech.dao;
import java.util.List;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.response.CoinOrderResp;
import com.lanchetech.entity.CoinOrder;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;

@Mapper
public interface CoinOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CoinOrder record);

    int insertSelective(CoinOrder record);

    CoinOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CoinOrder record);

    int updateByPrimaryKey(CoinOrder record);

    CoinOrder findOneByUserIdAndCoinProductId(@Param("userId") Long userId, @Param("coinProductId") Long coinProductId);

    Long sumByUserIdAndCoinProductId(@Param("userId")Long userId,@Param("coinProductId")Long coinProductId);

    List<CoinOrderResp> findAllFrontPage(PageReq req);

    List<CoinOrderResp> findAllPage(PageReq req);


}